<template>
    <div>
        <button @click="getMsg">获取信息</button>
    </div>
</template>

<script>
import axios from "axios";
export default {
    name: "App",
    methods: {
        getMsg() {
            // 代理服务器的ip+端口
            axios.get('http://localhost:8080/proxy1/index.html').then(
                response => {
                    console.log('请求成功',response.data)
                },
                error => {
                    console.log('请求失败',error.message)
                }
            )
        }
    }
}
</script>

<style>

</style>